/*
 * MIT License
 *
 * Copyright (c) 2023 OrdinaryRoad
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: douyin.proto

// Protobuf Java Version: 3.25.3
package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf;

/**
 * Protobuf type {@code PreMessage}
 */
public final class PreMessage extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:PreMessage)
    PreMessageOrBuilder {
private static final long serialVersionUID = 0L;
  // Use PreMessage.newBuilder() to construct.
  private PreMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private PreMessage() {
    sdkVersion_ = "";
    token_ = "";
    buildNumber_ = "";
    aa_ = "";
    devicePlatform_ = "";
    headers_ = java.util.Collections.emptyList();
    biz_ = "";
    access_ = "";
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new PreMessage();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return Douyin.internal_static_PreMessage_descriptor;
  }

  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return Douyin.internal_static_PreMessage_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            PreMessage.class, Builder.class);
  }

  private int bitField0_;
  public static final int CMD_FIELD_NUMBER = 1;
  private int cmd_ = 0;
  /**
   * <code>uint32 cmd = 1;</code>
   * @return The cmd.
   */
  @Override
  public int getCmd() {
    return cmd_;
  }

  public static final int SEQUENCEID_FIELD_NUMBER = 2;
  private int sequenceId_ = 0;
  /**
   * <code>uint32 sequenceId = 2;</code>
   * @return The sequenceId.
   */
  @Override
  public int getSequenceId() {
    return sequenceId_;
  }

  public static final int SDKVERSION_FIELD_NUMBER = 3;
  @SuppressWarnings("serial")
  private volatile Object sdkVersion_ = "";
  /**
   * <code>string sdkVersion = 3;</code>
   * @return The sdkVersion.
   */
  @Override
  public String getSdkVersion() {
    Object ref = sdkVersion_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      sdkVersion_ = s;
      return s;
    }
  }
  /**
   * <code>string sdkVersion = 3;</code>
   * @return The bytes for sdkVersion.
   */
  @Override
  public com.google.protobuf.ByteString
      getSdkVersionBytes() {
    Object ref = sdkVersion_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      sdkVersion_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TOKEN_FIELD_NUMBER = 4;
  @SuppressWarnings("serial")
  private volatile Object token_ = "";
  /**
   * <code>string token = 4;</code>
   * @return The token.
   */
  @Override
  public String getToken() {
    Object ref = token_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      token_ = s;
      return s;
    }
  }
  /**
   * <code>string token = 4;</code>
   * @return The bytes for token.
   */
  @Override
  public com.google.protobuf.ByteString
      getTokenBytes() {
    Object ref = token_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      token_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int REFER_FIELD_NUMBER = 5;
  private int refer_ = 0;
  /**
   * <code>uint32 refer = 5;</code>
   * @return The refer.
   */
  @Override
  public int getRefer() {
    return refer_;
  }

  public static final int INBOXTYPE_FIELD_NUMBER = 6;
  private int inboxType_ = 0;
  /**
   * <code>uint32 inboxType = 6;</code>
   * @return The inboxType.
   */
  @Override
  public int getInboxType() {
    return inboxType_;
  }

  public static final int BUILDNUMBER_FIELD_NUMBER = 7;
  @SuppressWarnings("serial")
  private volatile Object buildNumber_ = "";
  /**
   * <code>string buildNumber = 7;</code>
   * @return The buildNumber.
   */
  @Override
  public String getBuildNumber() {
    Object ref = buildNumber_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      buildNumber_ = s;
      return s;
    }
  }
  /**
   * <code>string buildNumber = 7;</code>
   * @return The bytes for buildNumber.
   */
  @Override
  public com.google.protobuf.ByteString
      getBuildNumberBytes() {
    Object ref = buildNumber_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      buildNumber_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SENDMESSAGEBODY_FIELD_NUMBER = 8;
  private SendMessageBody sendMessageBody_;
  /**
   * <code>.SendMessageBody sendMessageBody = 8;</code>
   * @return Whether the sendMessageBody field is set.
   */
  @Override
  public boolean hasSendMessageBody() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * <code>.SendMessageBody sendMessageBody = 8;</code>
   * @return The sendMessageBody.
   */
  @Override
  public SendMessageBody getSendMessageBody() {
    return sendMessageBody_ == null ? SendMessageBody.getDefaultInstance() : sendMessageBody_;
  }
  /**
   * <code>.SendMessageBody sendMessageBody = 8;</code>
   */
  @Override
  public SendMessageBodyOrBuilder getSendMessageBodyOrBuilder() {
    return sendMessageBody_ == null ? SendMessageBody.getDefaultInstance() : sendMessageBody_;
  }

  public static final int AA_FIELD_NUMBER = 9;
  @SuppressWarnings("serial")
  private volatile Object aa_ = "";
  /**
   * <pre>
   * 字段名待定
   * </pre>
   *
   * <code>string aa = 9;</code>
   * @return The aa.
   */
  @Override
  public String getAa() {
    Object ref = aa_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      aa_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 字段名待定
   * </pre>
   *
   * <code>string aa = 9;</code>
   * @return The bytes for aa.
   */
  @Override
  public com.google.protobuf.ByteString
      getAaBytes() {
    Object ref = aa_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      aa_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEVICEPLATFORM_FIELD_NUMBER = 11;
  @SuppressWarnings("serial")
  private volatile Object devicePlatform_ = "";
  /**
   * <code>string devicePlatform = 11;</code>
   * @return The devicePlatform.
   */
  @Override
  public String getDevicePlatform() {
    Object ref = devicePlatform_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      devicePlatform_ = s;
      return s;
    }
  }
  /**
   * <code>string devicePlatform = 11;</code>
   * @return The bytes for devicePlatform.
   */
  @Override
  public com.google.protobuf.ByteString
      getDevicePlatformBytes() {
    Object ref = devicePlatform_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      devicePlatform_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int HEADERS_FIELD_NUMBER = 15;
  @SuppressWarnings("serial")
  private java.util.List<HeadersList> headers_;
  /**
   * <code>repeated .HeadersList headers = 15;</code>
   */
  @Override
  public java.util.List<HeadersList> getHeadersList() {
    return headers_;
  }
  /**
   * <code>repeated .HeadersList headers = 15;</code>
   */
  @Override
  public java.util.List<? extends HeadersListOrBuilder>
      getHeadersOrBuilderList() {
    return headers_;
  }
  /**
   * <code>repeated .HeadersList headers = 15;</code>
   */
  @Override
  public int getHeadersCount() {
    return headers_.size();
  }
  /**
   * <code>repeated .HeadersList headers = 15;</code>
   */
  @Override
  public HeadersList getHeaders(int index) {
    return headers_.get(index);
  }
  /**
   * <code>repeated .HeadersList headers = 15;</code>
   */
  @Override
  public HeadersListOrBuilder getHeadersOrBuilder(
      int index) {
    return headers_.get(index);
  }

  public static final int AUTHTYPE_FIELD_NUMBER = 18;
  private int authType_ = 0;
  /**
   * <code>uint32 authType = 18;</code>
   * @return The authType.
   */
  @Override
  public int getAuthType() {
    return authType_;
  }

  public static final int BIZ_FIELD_NUMBER = 21;
  @SuppressWarnings("serial")
  private volatile Object biz_ = "";
  /**
   * <code>string biz = 21;</code>
   * @return The biz.
   */
  @Override
  public String getBiz() {
    Object ref = biz_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      biz_ = s;
      return s;
    }
  }
  /**
   * <code>string biz = 21;</code>
   * @return The bytes for biz.
   */
  @Override
  public com.google.protobuf.ByteString
      getBizBytes() {
    Object ref = biz_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      biz_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ACCESS_FIELD_NUMBER = 22;
  @SuppressWarnings("serial")
  private volatile Object access_ = "";
  /**
   * <code>string access = 22;</code>
   * @return The access.
   */
  @Override
  public String getAccess() {
    Object ref = access_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      access_ = s;
      return s;
    }
  }
  /**
   * <code>string access = 22;</code>
   * @return The bytes for access.
   */
  @Override
  public com.google.protobuf.ByteString
      getAccessBytes() {
    Object ref = access_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      access_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;
  @Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (cmd_ != 0) {
      output.writeUInt32(1, cmd_);
    }
    if (sequenceId_ != 0) {
      output.writeUInt32(2, sequenceId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sdkVersion_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sdkVersion_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, token_);
    }
    if (refer_ != 0) {
      output.writeUInt32(5, refer_);
    }
    if (inboxType_ != 0) {
      output.writeUInt32(6, inboxType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildNumber_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, buildNumber_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(8, getSendMessageBody());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(aa_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, aa_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(devicePlatform_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, devicePlatform_);
    }
    for (int i = 0; i < headers_.size(); i++) {
      output.writeMessage(15, headers_.get(i));
    }
    if (authType_ != 0) {
      output.writeUInt32(18, authType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(biz_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 21, biz_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(access_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 22, access_);
    }
    getUnknownFields().writeTo(output);
  }

  @Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (cmd_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt32Size(1, cmd_);
    }
    if (sequenceId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt32Size(2, sequenceId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sdkVersion_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sdkVersion_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, token_);
    }
    if (refer_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt32Size(5, refer_);
    }
    if (inboxType_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt32Size(6, inboxType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildNumber_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, buildNumber_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(8, getSendMessageBody());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(aa_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, aa_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(devicePlatform_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, devicePlatform_);
    }
    for (int i = 0; i < headers_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(15, headers_.get(i));
    }
    if (authType_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt32Size(18, authType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(biz_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, biz_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(access_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, access_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof PreMessage)) {
      return super.equals(obj);
    }
    PreMessage other = (PreMessage) obj;

    if (getCmd()
        != other.getCmd()) return false;
    if (getSequenceId()
        != other.getSequenceId()) return false;
    if (!getSdkVersion()
        .equals(other.getSdkVersion())) return false;
    if (!getToken()
        .equals(other.getToken())) return false;
    if (getRefer()
        != other.getRefer()) return false;
    if (getInboxType()
        != other.getInboxType()) return false;
    if (!getBuildNumber()
        .equals(other.getBuildNumber())) return false;
    if (hasSendMessageBody() != other.hasSendMessageBody()) return false;
    if (hasSendMessageBody()) {
      if (!getSendMessageBody()
          .equals(other.getSendMessageBody())) return false;
    }
    if (!getAa()
        .equals(other.getAa())) return false;
    if (!getDevicePlatform()
        .equals(other.getDevicePlatform())) return false;
    if (!getHeadersList()
        .equals(other.getHeadersList())) return false;
    if (getAuthType()
        != other.getAuthType()) return false;
    if (!getBiz()
        .equals(other.getBiz())) return false;
    if (!getAccess()
        .equals(other.getAccess())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + CMD_FIELD_NUMBER;
    hash = (53 * hash) + getCmd();
    hash = (37 * hash) + SEQUENCEID_FIELD_NUMBER;
    hash = (53 * hash) + getSequenceId();
    hash = (37 * hash) + SDKVERSION_FIELD_NUMBER;
    hash = (53 * hash) + getSdkVersion().hashCode();
    hash = (37 * hash) + TOKEN_FIELD_NUMBER;
    hash = (53 * hash) + getToken().hashCode();
    hash = (37 * hash) + REFER_FIELD_NUMBER;
    hash = (53 * hash) + getRefer();
    hash = (37 * hash) + INBOXTYPE_FIELD_NUMBER;
    hash = (53 * hash) + getInboxType();
    hash = (37 * hash) + BUILDNUMBER_FIELD_NUMBER;
    hash = (53 * hash) + getBuildNumber().hashCode();
    if (hasSendMessageBody()) {
      hash = (37 * hash) + SENDMESSAGEBODY_FIELD_NUMBER;
      hash = (53 * hash) + getSendMessageBody().hashCode();
    }
    hash = (37 * hash) + AA_FIELD_NUMBER;
    hash = (53 * hash) + getAa().hashCode();
    hash = (37 * hash) + DEVICEPLATFORM_FIELD_NUMBER;
    hash = (53 * hash) + getDevicePlatform().hashCode();
    if (getHeadersCount() > 0) {
      hash = (37 * hash) + HEADERS_FIELD_NUMBER;
      hash = (53 * hash) + getHeadersList().hashCode();
    }
    hash = (37 * hash) + AUTHTYPE_FIELD_NUMBER;
    hash = (53 * hash) + getAuthType();
    hash = (37 * hash) + BIZ_FIELD_NUMBER;
    hash = (53 * hash) + getBiz().hashCode();
    hash = (37 * hash) + ACCESS_FIELD_NUMBER;
    hash = (53 * hash) + getAccess().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static PreMessage parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static PreMessage parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static PreMessage parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static PreMessage parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static PreMessage parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static PreMessage parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static PreMessage parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static PreMessage parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static PreMessage parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static PreMessage parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static PreMessage parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static PreMessage parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(PreMessage prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code PreMessage}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:PreMessage)
      PreMessageOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return Douyin.internal_static_PreMessage_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return Douyin.internal_static_PreMessage_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              PreMessage.class, Builder.class);
    }

    // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.PreMessage.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getSendMessageBodyFieldBuilder();
        getHeadersFieldBuilder();
      }
    }
    @Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      cmd_ = 0;
      sequenceId_ = 0;
      sdkVersion_ = "";
      token_ = "";
      refer_ = 0;
      inboxType_ = 0;
      buildNumber_ = "";
      sendMessageBody_ = null;
      if (sendMessageBodyBuilder_ != null) {
        sendMessageBodyBuilder_.dispose();
        sendMessageBodyBuilder_ = null;
      }
      aa_ = "";
      devicePlatform_ = "";
      if (headersBuilder_ == null) {
        headers_ = java.util.Collections.emptyList();
      } else {
        headers_ = null;
        headersBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000400);
      authType_ = 0;
      biz_ = "";
      access_ = "";
      return this;
    }

    @Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return Douyin.internal_static_PreMessage_descriptor;
    }

    @Override
    public PreMessage getDefaultInstanceForType() {
      return PreMessage.getDefaultInstance();
    }

    @Override
    public PreMessage build() {
      PreMessage result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public PreMessage buildPartial() {
      PreMessage result = new PreMessage(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(PreMessage result) {
      if (headersBuilder_ == null) {
        if (((bitField0_ & 0x00000400) != 0)) {
          headers_ = java.util.Collections.unmodifiableList(headers_);
          bitField0_ = (bitField0_ & ~0x00000400);
        }
        result.headers_ = headers_;
      } else {
        result.headers_ = headersBuilder_.build();
      }
    }

    private void buildPartial0(PreMessage result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.cmd_ = cmd_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.sequenceId_ = sequenceId_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.sdkVersion_ = sdkVersion_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.token_ = token_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.refer_ = refer_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.inboxType_ = inboxType_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.buildNumber_ = buildNumber_;
      }
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.sendMessageBody_ = sendMessageBodyBuilder_ == null
            ? sendMessageBody_
            : sendMessageBodyBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.aa_ = aa_;
      }
      if (((from_bitField0_ & 0x00000200) != 0)) {
        result.devicePlatform_ = devicePlatform_;
      }
      if (((from_bitField0_ & 0x00000800) != 0)) {
        result.authType_ = authType_;
      }
      if (((from_bitField0_ & 0x00001000) != 0)) {
        result.biz_ = biz_;
      }
      if (((from_bitField0_ & 0x00002000) != 0)) {
        result.access_ = access_;
      }
      result.bitField0_ |= to_bitField0_;
    }

    @Override
    public Builder clone() {
      return super.clone();
    }
    @Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.setField(field, value);
    }
    @Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.addRepeatedField(field, value);
    }
    @Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof PreMessage) {
        return mergeFrom((PreMessage)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(PreMessage other) {
      if (other == PreMessage.getDefaultInstance()) return this;
      if (other.getCmd() != 0) {
        setCmd(other.getCmd());
      }
      if (other.getSequenceId() != 0) {
        setSequenceId(other.getSequenceId());
      }
      if (!other.getSdkVersion().isEmpty()) {
        sdkVersion_ = other.sdkVersion_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (!other.getToken().isEmpty()) {
        token_ = other.token_;
        bitField0_ |= 0x00000008;
        onChanged();
      }
      if (other.getRefer() != 0) {
        setRefer(other.getRefer());
      }
      if (other.getInboxType() != 0) {
        setInboxType(other.getInboxType());
      }
      if (!other.getBuildNumber().isEmpty()) {
        buildNumber_ = other.buildNumber_;
        bitField0_ |= 0x00000040;
        onChanged();
      }
      if (other.hasSendMessageBody()) {
        mergeSendMessageBody(other.getSendMessageBody());
      }
      if (!other.getAa().isEmpty()) {
        aa_ = other.aa_;
        bitField0_ |= 0x00000100;
        onChanged();
      }
      if (!other.getDevicePlatform().isEmpty()) {
        devicePlatform_ = other.devicePlatform_;
        bitField0_ |= 0x00000200;
        onChanged();
      }
      if (headersBuilder_ == null) {
        if (!other.headers_.isEmpty()) {
          if (headers_.isEmpty()) {
            headers_ = other.headers_;
            bitField0_ = (bitField0_ & ~0x00000400);
          } else {
            ensureHeadersIsMutable();
            headers_.addAll(other.headers_);
          }
          onChanged();
        }
      } else {
        if (!other.headers_.isEmpty()) {
          if (headersBuilder_.isEmpty()) {
            headersBuilder_.dispose();
            headersBuilder_ = null;
            headers_ = other.headers_;
            bitField0_ = (bitField0_ & ~0x00000400);
            headersBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getHeadersFieldBuilder() : null;
          } else {
            headersBuilder_.addAllMessages(other.headers_);
          }
        }
      }
      if (other.getAuthType() != 0) {
        setAuthType(other.getAuthType());
      }
      if (!other.getBiz().isEmpty()) {
        biz_ = other.biz_;
        bitField0_ |= 0x00001000;
        onChanged();
      }
      if (!other.getAccess().isEmpty()) {
        access_ = other.access_;
        bitField0_ |= 0x00002000;
        onChanged();
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @Override
    public final boolean isInitialized() {
      return true;
    }

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              cmd_ = input.readUInt32();
              bitField0_ |= 0x00000001;
              break;
            } // case 8
            case 16: {
              sequenceId_ = input.readUInt32();
              bitField0_ |= 0x00000002;
              break;
            } // case 16
            case 26: {
              sdkVersion_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000004;
              break;
            } // case 26
            case 34: {
              token_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000008;
              break;
            } // case 34
            case 40: {
              refer_ = input.readUInt32();
              bitField0_ |= 0x00000010;
              break;
            } // case 40
            case 48: {
              inboxType_ = input.readUInt32();
              bitField0_ |= 0x00000020;
              break;
            } // case 48
            case 58: {
              buildNumber_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000040;
              break;
            } // case 58
            case 66: {
              input.readMessage(
                  getSendMessageBodyFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000080;
              break;
            } // case 66
            case 74: {
              aa_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000100;
              break;
            } // case 74
            case 90: {
              devicePlatform_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000200;
              break;
            } // case 90
            case 122: {
              HeadersList m =
                  input.readMessage(
                      HeadersList.parser(),
                      extensionRegistry);
              if (headersBuilder_ == null) {
                ensureHeadersIsMutable();
                headers_.add(m);
              } else {
                headersBuilder_.addMessage(m);
              }
              break;
            } // case 122
            case 144: {
              authType_ = input.readUInt32();
              bitField0_ |= 0x00000800;
              break;
            } // case 144
            case 170: {
              biz_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00001000;
              break;
            } // case 170
            case 178: {
              access_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00002000;
              break;
            } // case 178
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private int cmd_ ;
    /**
     * <code>uint32 cmd = 1;</code>
     * @return The cmd.
     */
    @Override
    public int getCmd() {
      return cmd_;
    }
    /**
     * <code>uint32 cmd = 1;</code>
     * @param value The cmd to set.
     * @return This builder for chaining.
     */
    public Builder setCmd(int value) {

      cmd_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>uint32 cmd = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearCmd() {
      bitField0_ = (bitField0_ & ~0x00000001);
      cmd_ = 0;
      onChanged();
      return this;
    }

    private int sequenceId_ ;
    /**
     * <code>uint32 sequenceId = 2;</code>
     * @return The sequenceId.
     */
    @Override
    public int getSequenceId() {
      return sequenceId_;
    }
    /**
     * <code>uint32 sequenceId = 2;</code>
     * @param value The sequenceId to set.
     * @return This builder for chaining.
     */
    public Builder setSequenceId(int value) {

      sequenceId_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <code>uint32 sequenceId = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearSequenceId() {
      bitField0_ = (bitField0_ & ~0x00000002);
      sequenceId_ = 0;
      onChanged();
      return this;
    }

    private Object sdkVersion_ = "";
    /**
     * <code>string sdkVersion = 3;</code>
     * @return The sdkVersion.
     */
    public String getSdkVersion() {
      Object ref = sdkVersion_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        sdkVersion_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string sdkVersion = 3;</code>
     * @return The bytes for sdkVersion.
     */
    public com.google.protobuf.ByteString
        getSdkVersionBytes() {
      Object ref = sdkVersion_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        sdkVersion_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string sdkVersion = 3;</code>
     * @param value The sdkVersion to set.
     * @return This builder for chaining.
     */
    public Builder setSdkVersion(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      sdkVersion_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <code>string sdkVersion = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearSdkVersion() {
      sdkVersion_ = getDefaultInstance().getSdkVersion();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     * <code>string sdkVersion = 3;</code>
     * @param value The bytes for sdkVersion to set.
     * @return This builder for chaining.
     */
    public Builder setSdkVersionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      sdkVersion_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private Object token_ = "";
    /**
     * <code>string token = 4;</code>
     * @return The token.
     */
    public String getToken() {
      Object ref = token_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        token_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string token = 4;</code>
     * @return The bytes for token.
     */
    public com.google.protobuf.ByteString
        getTokenBytes() {
      Object ref = token_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        token_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string token = 4;</code>
     * @param value The token to set.
     * @return This builder for chaining.
     */
    public Builder setToken(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      token_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <code>string token = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearToken() {
      token_ = getDefaultInstance().getToken();
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }
    /**
     * <code>string token = 4;</code>
     * @param value The bytes for token to set.
     * @return This builder for chaining.
     */
    public Builder setTokenBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      token_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }

    private int refer_ ;
    /**
     * <code>uint32 refer = 5;</code>
     * @return The refer.
     */
    @Override
    public int getRefer() {
      return refer_;
    }
    /**
     * <code>uint32 refer = 5;</code>
     * @param value The refer to set.
     * @return This builder for chaining.
     */
    public Builder setRefer(int value) {

      refer_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * <code>uint32 refer = 5;</code>
     * @return This builder for chaining.
     */
    public Builder clearRefer() {
      bitField0_ = (bitField0_ & ~0x00000010);
      refer_ = 0;
      onChanged();
      return this;
    }

    private int inboxType_ ;
    /**
     * <code>uint32 inboxType = 6;</code>
     * @return The inboxType.
     */
    @Override
    public int getInboxType() {
      return inboxType_;
    }
    /**
     * <code>uint32 inboxType = 6;</code>
     * @param value The inboxType to set.
     * @return This builder for chaining.
     */
    public Builder setInboxType(int value) {

      inboxType_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * <code>uint32 inboxType = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearInboxType() {
      bitField0_ = (bitField0_ & ~0x00000020);
      inboxType_ = 0;
      onChanged();
      return this;
    }

    private Object buildNumber_ = "";
    /**
     * <code>string buildNumber = 7;</code>
     * @return The buildNumber.
     */
    public String getBuildNumber() {
      Object ref = buildNumber_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        buildNumber_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string buildNumber = 7;</code>
     * @return The bytes for buildNumber.
     */
    public com.google.protobuf.ByteString
        getBuildNumberBytes() {
      Object ref = buildNumber_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        buildNumber_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string buildNumber = 7;</code>
     * @param value The buildNumber to set.
     * @return This builder for chaining.
     */
    public Builder setBuildNumber(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      buildNumber_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     * <code>string buildNumber = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearBuildNumber() {
      buildNumber_ = getDefaultInstance().getBuildNumber();
      bitField0_ = (bitField0_ & ~0x00000040);
      onChanged();
      return this;
    }
    /**
     * <code>string buildNumber = 7;</code>
     * @param value The bytes for buildNumber to set.
     * @return This builder for chaining.
     */
    public Builder setBuildNumberBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      buildNumber_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }

    private SendMessageBody sendMessageBody_;
    private com.google.protobuf.SingleFieldBuilderV3<
        SendMessageBody, SendMessageBody.Builder, SendMessageBodyOrBuilder> sendMessageBodyBuilder_;
    /**
     * <code>.SendMessageBody sendMessageBody = 8;</code>
     * @return Whether the sendMessageBody field is set.
     */
    public boolean hasSendMessageBody() {
      return ((bitField0_ & 0x00000080) != 0);
    }
    /**
     * <code>.SendMessageBody sendMessageBody = 8;</code>
     * @return The sendMessageBody.
     */
    public SendMessageBody getSendMessageBody() {
      if (sendMessageBodyBuilder_ == null) {
        return sendMessageBody_ == null ? SendMessageBody.getDefaultInstance() : sendMessageBody_;
      } else {
        return sendMessageBodyBuilder_.getMessage();
      }
    }
    /**
     * <code>.SendMessageBody sendMessageBody = 8;</code>
     */
    public Builder setSendMessageBody(SendMessageBody value) {
      if (sendMessageBodyBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        sendMessageBody_ = value;
      } else {
        sendMessageBodyBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     * <code>.SendMessageBody sendMessageBody = 8;</code>
     */
    public Builder setSendMessageBody(
        SendMessageBody.Builder builderForValue) {
      if (sendMessageBodyBuilder_ == null) {
        sendMessageBody_ = builderForValue.build();
      } else {
        sendMessageBodyBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     * <code>.SendMessageBody sendMessageBody = 8;</code>
     */
    public Builder mergeSendMessageBody(SendMessageBody value) {
      if (sendMessageBodyBuilder_ == null) {
        if (((bitField0_ & 0x00000080) != 0) &&
          sendMessageBody_ != null &&
          sendMessageBody_ != SendMessageBody.getDefaultInstance()) {
          getSendMessageBodyBuilder().mergeFrom(value);
        } else {
          sendMessageBody_ = value;
        }
      } else {
        sendMessageBodyBuilder_.mergeFrom(value);
      }
      if (sendMessageBody_ != null) {
        bitField0_ |= 0x00000080;
        onChanged();
      }
      return this;
    }
    /**
     * <code>.SendMessageBody sendMessageBody = 8;</code>
     */
    public Builder clearSendMessageBody() {
      bitField0_ = (bitField0_ & ~0x00000080);
      sendMessageBody_ = null;
      if (sendMessageBodyBuilder_ != null) {
        sendMessageBodyBuilder_.dispose();
        sendMessageBodyBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <code>.SendMessageBody sendMessageBody = 8;</code>
     */
    public SendMessageBody.Builder getSendMessageBodyBuilder() {
      bitField0_ |= 0x00000080;
      onChanged();
      return getSendMessageBodyFieldBuilder().getBuilder();
    }
    /**
     * <code>.SendMessageBody sendMessageBody = 8;</code>
     */
    public SendMessageBodyOrBuilder getSendMessageBodyOrBuilder() {
      if (sendMessageBodyBuilder_ != null) {
        return sendMessageBodyBuilder_.getMessageOrBuilder();
      } else {
        return sendMessageBody_ == null ?
            SendMessageBody.getDefaultInstance() : sendMessageBody_;
      }
    }
    /**
     * <code>.SendMessageBody sendMessageBody = 8;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        SendMessageBody, SendMessageBody.Builder, SendMessageBodyOrBuilder>
        getSendMessageBodyFieldBuilder() {
      if (sendMessageBodyBuilder_ == null) {
        sendMessageBodyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            SendMessageBody, SendMessageBody.Builder, SendMessageBodyOrBuilder>(
                getSendMessageBody(),
                getParentForChildren(),
                isClean());
        sendMessageBody_ = null;
      }
      return sendMessageBodyBuilder_;
    }

    private Object aa_ = "";
    /**
     * <pre>
     * 字段名待定
     * </pre>
     *
     * <code>string aa = 9;</code>
     * @return The aa.
     */
    public String getAa() {
      Object ref = aa_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        aa_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <pre>
     * 字段名待定
     * </pre>
     *
     * <code>string aa = 9;</code>
     * @return The bytes for aa.
     */
    public com.google.protobuf.ByteString
        getAaBytes() {
      Object ref = aa_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        aa_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 字段名待定
     * </pre>
     *
     * <code>string aa = 9;</code>
     * @param value The aa to set.
     * @return This builder for chaining.
     */
    public Builder setAa(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      aa_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 字段名待定
     * </pre>
     *
     * <code>string aa = 9;</code>
     * @return This builder for chaining.
     */
    public Builder clearAa() {
      aa_ = getDefaultInstance().getAa();
      bitField0_ = (bitField0_ & ~0x00000100);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 字段名待定
     * </pre>
     *
     * <code>string aa = 9;</code>
     * @param value The bytes for aa to set.
     * @return This builder for chaining.
     */
    public Builder setAaBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      aa_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }

    private Object devicePlatform_ = "";
    /**
     * <code>string devicePlatform = 11;</code>
     * @return The devicePlatform.
     */
    public String getDevicePlatform() {
      Object ref = devicePlatform_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        devicePlatform_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string devicePlatform = 11;</code>
     * @return The bytes for devicePlatform.
     */
    public com.google.protobuf.ByteString
        getDevicePlatformBytes() {
      Object ref = devicePlatform_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        devicePlatform_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string devicePlatform = 11;</code>
     * @param value The devicePlatform to set.
     * @return This builder for chaining.
     */
    public Builder setDevicePlatform(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      devicePlatform_ = value;
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     * <code>string devicePlatform = 11;</code>
     * @return This builder for chaining.
     */
    public Builder clearDevicePlatform() {
      devicePlatform_ = getDefaultInstance().getDevicePlatform();
      bitField0_ = (bitField0_ & ~0x00000200);
      onChanged();
      return this;
    }
    /**
     * <code>string devicePlatform = 11;</code>
     * @param value The bytes for devicePlatform to set.
     * @return This builder for chaining.
     */
    public Builder setDevicePlatformBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      devicePlatform_ = value;
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }

    private java.util.List<HeadersList> headers_ =
      java.util.Collections.emptyList();
    private void ensureHeadersIsMutable() {
      if (!((bitField0_ & 0x00000400) != 0)) {
        headers_ = new java.util.ArrayList<HeadersList>(headers_);
        bitField0_ |= 0x00000400;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        HeadersList, HeadersList.Builder, HeadersListOrBuilder> headersBuilder_;

    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public java.util.List<HeadersList> getHeadersList() {
      if (headersBuilder_ == null) {
        return java.util.Collections.unmodifiableList(headers_);
      } else {
        return headersBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public int getHeadersCount() {
      if (headersBuilder_ == null) {
        return headers_.size();
      } else {
        return headersBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public HeadersList getHeaders(int index) {
      if (headersBuilder_ == null) {
        return headers_.get(index);
      } else {
        return headersBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public Builder setHeaders(
        int index, HeadersList value) {
      if (headersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureHeadersIsMutable();
        headers_.set(index, value);
        onChanged();
      } else {
        headersBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public Builder setHeaders(
        int index, HeadersList.Builder builderForValue) {
      if (headersBuilder_ == null) {
        ensureHeadersIsMutable();
        headers_.set(index, builderForValue.build());
        onChanged();
      } else {
        headersBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public Builder addHeaders(HeadersList value) {
      if (headersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureHeadersIsMutable();
        headers_.add(value);
        onChanged();
      } else {
        headersBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public Builder addHeaders(
        int index, HeadersList value) {
      if (headersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureHeadersIsMutable();
        headers_.add(index, value);
        onChanged();
      } else {
        headersBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public Builder addHeaders(
        HeadersList.Builder builderForValue) {
      if (headersBuilder_ == null) {
        ensureHeadersIsMutable();
        headers_.add(builderForValue.build());
        onChanged();
      } else {
        headersBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public Builder addHeaders(
        int index, HeadersList.Builder builderForValue) {
      if (headersBuilder_ == null) {
        ensureHeadersIsMutable();
        headers_.add(index, builderForValue.build());
        onChanged();
      } else {
        headersBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public Builder addAllHeaders(
        Iterable<? extends HeadersList> values) {
      if (headersBuilder_ == null) {
        ensureHeadersIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, headers_);
        onChanged();
      } else {
        headersBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public Builder clearHeaders() {
      if (headersBuilder_ == null) {
        headers_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000400);
        onChanged();
      } else {
        headersBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public Builder removeHeaders(int index) {
      if (headersBuilder_ == null) {
        ensureHeadersIsMutable();
        headers_.remove(index);
        onChanged();
      } else {
        headersBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public HeadersList.Builder getHeadersBuilder(
        int index) {
      return getHeadersFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public HeadersListOrBuilder getHeadersOrBuilder(
        int index) {
      if (headersBuilder_ == null) {
        return headers_.get(index);  } else {
        return headersBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public java.util.List<? extends HeadersListOrBuilder>
         getHeadersOrBuilderList() {
      if (headersBuilder_ != null) {
        return headersBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(headers_);
      }
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public HeadersList.Builder addHeadersBuilder() {
      return getHeadersFieldBuilder().addBuilder(
          HeadersList.getDefaultInstance());
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public HeadersList.Builder addHeadersBuilder(
        int index) {
      return getHeadersFieldBuilder().addBuilder(
          index, HeadersList.getDefaultInstance());
    }
    /**
     * <code>repeated .HeadersList headers = 15;</code>
     */
    public java.util.List<HeadersList.Builder>
         getHeadersBuilderList() {
      return getHeadersFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        HeadersList, HeadersList.Builder, HeadersListOrBuilder>
        getHeadersFieldBuilder() {
      if (headersBuilder_ == null) {
        headersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            HeadersList, HeadersList.Builder, HeadersListOrBuilder>(
                headers_,
                ((bitField0_ & 0x00000400) != 0),
                getParentForChildren(),
                isClean());
        headers_ = null;
      }
      return headersBuilder_;
    }

    private int authType_ ;
    /**
     * <code>uint32 authType = 18;</code>
     * @return The authType.
     */
    @Override
    public int getAuthType() {
      return authType_;
    }
    /**
     * <code>uint32 authType = 18;</code>
     * @param value The authType to set.
     * @return This builder for chaining.
     */
    public Builder setAuthType(int value) {

      authType_ = value;
      bitField0_ |= 0x00000800;
      onChanged();
      return this;
    }
    /**
     * <code>uint32 authType = 18;</code>
     * @return This builder for chaining.
     */
    public Builder clearAuthType() {
      bitField0_ = (bitField0_ & ~0x00000800);
      authType_ = 0;
      onChanged();
      return this;
    }

    private Object biz_ = "";
    /**
     * <code>string biz = 21;</code>
     * @return The biz.
     */
    public String getBiz() {
      Object ref = biz_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        biz_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string biz = 21;</code>
     * @return The bytes for biz.
     */
    public com.google.protobuf.ByteString
        getBizBytes() {
      Object ref = biz_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        biz_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string biz = 21;</code>
     * @param value The biz to set.
     * @return This builder for chaining.
     */
    public Builder setBiz(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      biz_ = value;
      bitField0_ |= 0x00001000;
      onChanged();
      return this;
    }
    /**
     * <code>string biz = 21;</code>
     * @return This builder for chaining.
     */
    public Builder clearBiz() {
      biz_ = getDefaultInstance().getBiz();
      bitField0_ = (bitField0_ & ~0x00001000);
      onChanged();
      return this;
    }
    /**
     * <code>string biz = 21;</code>
     * @param value The bytes for biz to set.
     * @return This builder for chaining.
     */
    public Builder setBizBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      biz_ = value;
      bitField0_ |= 0x00001000;
      onChanged();
      return this;
    }

    private Object access_ = "";
    /**
     * <code>string access = 22;</code>
     * @return The access.
     */
    public String getAccess() {
      Object ref = access_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        access_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string access = 22;</code>
     * @return The bytes for access.
     */
    public com.google.protobuf.ByteString
        getAccessBytes() {
      Object ref = access_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        access_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string access = 22;</code>
     * @param value The access to set.
     * @return This builder for chaining.
     */
    public Builder setAccess(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      access_ = value;
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    /**
     * <code>string access = 22;</code>
     * @return This builder for chaining.
     */
    public Builder clearAccess() {
      access_ = getDefaultInstance().getAccess();
      bitField0_ = (bitField0_ & ~0x00002000);
      onChanged();
      return this;
    }
    /**
     * <code>string access = 22;</code>
     * @param value The bytes for access to set.
     * @return This builder for chaining.
     */
    public Builder setAccessBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      access_ = value;
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:PreMessage)
  }

  // @@protoc_insertion_point(class_scope:PreMessage)
  private static final PreMessage DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new PreMessage();
  }

  public static PreMessage getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<PreMessage>
      PARSER = new com.google.protobuf.AbstractParser<PreMessage>() {
    @Override
    public PreMessage parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser<PreMessage> parser() {
    return PARSER;
  }

  @Override
  public com.google.protobuf.Parser<PreMessage> getParserForType() {
    return PARSER;
  }

  @Override
  public PreMessage getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

